using System;
using System.Web.UI;

using OpenNetCommerce.Localization;
using SubSonic.Utilities;

namespace MettleSystems.dashCommerce.Web.admin {
  public partial class overview : MettleSystems.dashCommerce.Controls.AdminPage {

    #region Member Variables

    private string view;
    private string title;
    #endregion

    #region Page Events

    protected void Page_Load(object sender, EventArgs e) {
      view = Utility.GetParameter("view");
      title = LocalizationUtility.GetText("titleOverview");
      switch(view) {
        case "si": //Site Settings
          siteSettingsOverview.Visible = true;
          Page.Title = string.Format(title, LocalizationUtility.GetText("pnlSiteOverview"));
          break;
        case "sec": //Security
          security.Visible = true;
          Page.Title = string.Format(title, LocalizationUtility.GetText("pnlSecurity"));
          break;
        case "s": //Sales
          sales.Visible = true;
          Page.Title = string.Format(title, LocalizationUtility.GetText("pnlSales"));
          break;
        case "pm": //Product Management
          productmanagement.Visible = true;
          Page.Title = string.Format(title, LocalizationUtility.GetText("pnlProductManagement"));
          break;
        case "pco": //Product Coupons
          productcoupons.Visible = true;
          Page.Title = string.Format(title, LocalizationUtility.GetText("pnlProductCoupons"));
          break;
        case "c": //Configuration
          configuration.Visible = true;
          Page.Title = string.Format(title, LocalizationUtility.GetText("pnlConfigurationOverview"));
          break;
        case "mc": //Mail Configuration
          mailConfiguration.Visible = true;
          Page.Title = string.Format(title, LocalizationUtility.GetText("pnlMailConfiguration"));          
          break;
        case "pc": //Payment Configuration
          providers.Visible = true;
          Page.Title = string.Format(title, LocalizationUtility.GetText("pnlPaymentConfiguration"));          
          break;
        case "tc": //Tax Configuration
          providers.Visible = true;
          Page.Title = string.Format(title, LocalizationUtility.GetText("pnlTaxConfiguration"));          
          break;
        case "sc": //Shipping Configuration
          providers.Visible = true;
          Page.Title = string.Format(title, LocalizationUtility.GetText("pnlShippingConfiguration"));          
          break;
        case "cs"://customer service
          customerService.Visible = true;
          Page.Title = string.Format(title, LocalizationUtility.GetText("pnlCustomerServiceConfiguration"));
          break;
        default:
          lblNotDone.Visible = true;
          break;
      }
    }

    #endregion

  }
}
